Non-volatile storage device and control method thereof

ABSTRACT

To provide a nonvolatile storage device and control method thereof which improve convenience of portable devices by shortening initialization time. In generating a data validity table at initialization, a control part firstly reads out a validity flag and a second translation table. In the case where the validity flag is valid, logical blocks in the second translation table are valid. For that reason, the fourth table generation means can set all logical blocks in the second translation table as being valid, in the data validity table. In a single reading as mentioned above, the fourth table generation means can carry out setting with respect to a plurality of logical blocks. Further, with respect to a partial logical block which is set as being valid in the data validity table, it is possible to bypass reading out the data validity flag of the block and proceed to operation of next partial logical block.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a Section 371 of International Application No.PCT/JP02/08332, filed Aug. 16, 2002, the disclosure of which isincorporated herein by reference.

TECHNICAL FIELD

The present invention relates to a nonvolatile storage device andcontrol method thereof.

BACKGROUND ART

A storage device having a nonvolatile memory such as a flash memory,which is capable of rewriting data therein, has a high portability, anddoes not need backup by battery and the like, has been increasingly usedas a storage device of portable devices handling music data and imagedata.

A prior art nonvolatile storage device having four 512-Mbit flash chipsof 256 MB capacity will be explained with reference to FIG. 4 to FIG.10.

FIG. 4 is a configuration view of the nonvolatile storage device.

In FIG. 4, 1 designates a nonvolatile storage device and 8 designates adata input/output device. The nonvolatile storage device 1 hasnonvolatile storage mediums 2 (flash memories in a conventionalembodiment and embodiments of the present invention) and a control part3. The control part 3 further has a first translation table (an indirectaddress translation table) 4, a data validity table (a fourth table) 5,an entry table (a third table) 6 and an input/output control part 7.

The nonvolatile storage device 1 accepts various requests includingwrite request, read request, clear request and so on from the datainput/output device 8 through the input/output control part 7. Thenonvolatile storage device 1 performs processings for the acceptedvarious requests. In the case of the write request, data to be writtenis transferred from the data input/output device 8 to the nonvolatilestorage device 1. In the case of the read request, data to be read outis transferred from the nonvolatile storage device 1 to the datainput/output device 8. At the request accepted by the input/outputcontrol part 7, the control part 3 carries out writing, reading orclearing on the nonvolatile storage medium 2. The control part 3 alsorefers to and updates the first translation table 4, the data validitytable 5 and the entry table 6.

FIG. 5 is a configuration view showing the nonvolatile storage medium 2of the nonvolatile storage device 1.

In FIG. 5, 1-1, 1-2, . . . 1-2048, 2-1, . . . 8-2048 each designate aphysical block. In the nonvolatile storage medium such as flash memory,data is cleared in the unit of physical blocks. The physical blocks 1-1,. . . 1-2048 are collectively referred to as a first physical blockgroup. The same applies to a second physical block group to an eighthphysical block group. A single nonvolatile storage medium 2 (storageelement) consists of eight physical block groups, each group having 2048(=2¹¹) physical blocks, thereby containing 16,384 (=2¹⁴) physical blocksin total.

Further, a single physical block set consists of eight physical blocksselected from each of eight block groups. For example, as shown in thedrawing, 1-1, 2-2, 3-3, 4-3, 5-2, 6-2048, 7-1 and 8-3 are collectivelyreferred to as a first physical block set.

It takes time to write data in the nonvolatile storage medium 2.Therefore, the control part 3 writes eight input data in a physicalblock set at a time. By simultaneously writing data in eight physicalblocks (one physical block set), bit width of data becomes eight timesgreater so that writing speed of the nonvolatile storage device 1 can beimproved eight times faster. However, in the nonvolatile storage device1, it is impossible to simultaneously write data in plural physicalblocks of one and the same physical block group. The technique forsimultaneously writing data in plural physical blocks of the nonvolatilememory has become publicly known. For example, data sheet of thenonvolatile memory TC58512FT manufactured by Kabushiki Kaisha Toshibaprovides an explanation of multi-block program for simultaneouslywriting data in plural physical blocks.

FIG. 6 is a configuration view showing the first physical block set ofthe nonvolatile storage medium in the nonvolatile storage device.

In FIG. 6, the physical block 1-1 consists of eight partial logicalblocks including 1-1A, 1-1B, 1-1C, . . . 1-1H. A single logical block iscomprised of partial logical blocks that selected one by one in asequential order, from all physical blocks included in the physicalblock set. For example, as shown in the drawing, 1-1A, 2-2A, 3-3A, 4-3A,5-2A, 6-2048A, 7-1A and 8-3A are collectively referred to as a firstlogical block. One physical block and one logical block are each 32pages, and one partial logical block is 4 pages.

FIG. 7 is a detail view showing a redundant area of the physical blockof the nonvolatile storage medium in the nonvolatile storage device.

The partial logical block has a redundant area in addition to data. Eachpartial logical block of the first physical block group has a datavalidity flag in the redundant area. Some partial logical blocks of thefirst physical block group have a link table and a second translationtable in the redundant area.

The second translation table is a table for translating logicaladdresses into physical addresses (physical addresses of partial logicalblocks) of eight partial logical blocks included in the first physicalblock group. The link table is a table for physical addresses (physicaladdresses of partial logical blocks) of seven partial logical blocks(other than a partial logical block which is included in the firstphysical block group and has the link table) included in the second toeighth physical block groups. The validity flag is a flag for indicatingwhether the second translation table of the logical block is valid orinvalid.

The second translation table may lie in the second to eighth physicalblock groups as well as the first physical block group.

A leading partial logical block of each physical block has first datacapable of determining whether the physical block including the partiallogical block has been cleared or not. Supposing that the first data is8-bit data, when the data value is FFH, the physical block has beencleared, and when it is a value other than FFH, the physical block hasnot been cleared. The first data may be used for any purpose other thanthat of determining whether the physical block has been cleared or not.

Writing is performed in the unit of physical block sets and clearance isperformed in the unit of physical blocks. Whether written data is validor invalid can be determined in the unit of partial logical blocks.

FIG. 9 is a configuration view of the entry table 6.

In FIG. 9, numeral 0 or 1 represents the state of each physical blockarranged in order of address 0, 1, 2, . . . . Numeral 0 indicates thatwriting has been completed and numeral 1 indicates that clearance hasbeen completed. The entry table is prepared at initialization.

FIG. 10 is a configuration view of the data validity table 5.

In FIG. 10, numeral 0 or 1 represents validity of data written in eachpartial logical block of the first physical block group arranged inorder of address 0, 1, 2, . . . . Numeral 0 indicates invalidity andnumeral 1 indicates validity. Just like the entry table, the datavalidity table is prepared at initialization.

FIGS. 8A and 8B are flowcharts of operations of a third table generationmeans and a fourth table generation means at initialization of theconventional nonvolatile storage device. Part a of FIG. 8A is connectedto part a of FIG. 8B.

In FIGS. 8A and 8B, at step 801, the third table generation meansinitializes all fields of the entry table by the default value 1(cleared). At step 802, the fourth table generation means initializesall fields of the data validity table by the default value 0 (invalid).At step 803, the control part 3 initializes physical block number j inthe physical block group by the default value 1. At step 804, thecontrol part 3 initializes partial logical block number i in thephysical block by the default value 1.

At step 805, the control part 3 reads . . . out the first partiallogical block of the j^(th) physical block in the first physical blockgroup. At step 806, in accordance with the first data of a leading pageof the physical block read out, the control part 3 determines whetherthe physical block is a cleared one or not. In the case of the clearedphysical block, the entry table has been already initialized with thedefault value 1 (cleared) at the step 801 and the data validity tablehas been already initialized with the default value 0 (invalid) at thestep 802. Therefore, the control part 3 completes processing of thej^(th) physical block without doing anything. In the case where it isthe written physical block, the operation proceeds to step 807 and thethird table generation means writes 0 (written) in the field of thephysical block of the entry table.

At step 809, the control part 3 determines whether the validity flag inredundant area is valid or not. In the case where the validity flag isinvalid, the data validity table has been already initialized with thedefault value 0 (invalid) at the step 802, and therefore the controlpart 3 completes processing of the i^(th) partial logical block withoutdoing anything. In the case where the validity flag is valid, theoperation proceeds to step 810 and the fourth table generation meanswrites 1 (valid) in the field of the partial logical block of the datavalidity table.

At step 811, the control part 3 adds 1 to the partial physical blocknumber i in the physical block. At step 812, the control part 3determines whether the partial logical block is a last one in thephysical block or not, that is, i>8 or not. In the case where thepartial logical block is not a last one, that is, i≦8, the operationreturns to the step 808 and the control part 3 reads out the i^(th)partial logical block of the j^(th) physical block in the first physicalblock group and carries out processings at the steps 809 to 812 again.In the case where the partial logical block is a last one, that is, i>8at the step 812, the control part 3 completes processing of the j^(th)physical block and proceeds to processing of the next physical block.

At step 813, the control part 3 adds 1 to the physical block number j inthe physical block group to 1. At step 814, the control part 3determines whether the physical block is a last one in the physicalblock group or not, that is, j>2048 or not. In the case where thephysical block is not a last one, that is, j≦2048, the operation returnsto the step 804 and the control part 3 performs processing of the nextphysical block. In the case where the physical block is a last one, thatis, j>2048, the control part 3 completes processing of the firstphysical block group and proceeds to processing of the second physicalblock group.

At step 815, the control part 3 initializes physical block group numberk by the default value 2. At step 816, the control part 3 initializesphysical block number j in the physical block group by the default value1.

At step 817, the control part 3 reads out the first partial logicalblock of the j^(th) physical block in the k^(th) physical block group.At step 818, in accordance with the first data of a leading page of thephysical block read out, the control part 3 determines whether thephysical block is a cleared one or not. In the case of the clearedphysical block, the entry table has been already initialized with thedefault value 1 (cleared) at the step 801 and therefore the control part3 completes the processing of the j^(th) physical block without doinganything. In the case where it is the written physical block, theoperation proceeds to step 819 and the third table generation meanswrites 0 (written) in the field of the physical block of the entrytable.

At step 820, the control part 3 adds 1 to the physical block number j inthe physical block group. At step 821, the control part 3 determineswhether the physical block is a last one in the physical block group ornot, that is, j>2048 or not. In the case where the physical block is nota last one, that is, j≦2048, the operation returns to the step 817 andthe control part 3 performs processing of the next physical block. Inthe case where the physical block is a last one, that is, j>2048, thecontrol part 3 completes processing of the k^(th) physical block groupand proceeds to processing of the next physical block group.

At step 822, the control part 3 adds 1 to the physical block groupnumber k to 1. At step 823, the control part 3 determines whether thephysical block group is a last one or not, that is, k>8 or not. In thecase where the physical block group is not a last one, that is, k≦8, theoperation returns to the step 816 and the control part 3 carries outprocessing of the next physical block group. In the case where thephysical block group is a last one, that is, k>8, this flowchart ends.

In this way, when the nonvolatile storage device is inserted into a mainbody, the nonvolatile storage device 1 generates an address controltable including an address translation table for translating logicaladdress designated by the main body into physical address of thenonvolatile storage device. Accordingly, time required for generatingthe address control table (hereinafter referred to as initializationtime) increases in proportion to capacity of the nonvolatile memory.

In these days, the tendency has been toward an increase in informationvolume handled by portable devices, and in order to deal with thetendency, storage capacity of the nonvolatile storage device has alsoincreased.

The increase in memory capacity, however, has caused an increase ininitialization time. It is impossible to provide an external data accessto the nonvolatile storage device having the nonvolatile memory duringinitialization time. In other words, the problem is that, afterinserting the nonvolatile storage device into the portable device, timerequired to recognize the nonvolatile storage device by the portabledevice, that is, time during which the user cannot operate the portabledevice has increased.

The present invention solves the above-mentioned conventional problemand intends to provide a nonvolatile storage device and control methodthereof which enable to improve convenience of portable devices byshortening initialization time.

DISCLOSURE OF INVENTION

In order to solve the above-mentioned problem, the present invention hasa following configuration.

A nonvolatile storage device according to the present invention from oneaspect comprises a plurality of physical blocks; a first tablegeneration means for generating a first translation table to obtainphysical addresses from logical addresses; a second table generationmeans for generating a second translation table to obtain physicaladdresses from logical addresses; and a third table generation means forgenerating a third table which indicates whether each of theabove-mentioned physical blocks has been cleared or not, wherein theabove-mentioned physical block has a data area which stores data thereinand first data which indicates whether the above-mentioned physicalblock has been cleared or not, and the above-mentioned physical blockdesignated by the physical address of the above-mentioned firsttranslation table further has the above-mentioned second translationtable, and the above-mentioned third table generation means reads outthe above-mentioned first data and the above-mentioned secondtranslation table from the above-mentioned physical block, decides avalue of the above-mentioned third table of the above-mentioned physicalblock in accordance with the above-mentioned first data, determines thata value of the above-mentioned third table of the above-mentionedphysical block corresponding to the physical address contained in theabove-mentioned second translation table is the value indicating thatthe above-mentioned physical block has not been cleared, and does notread the above-mentioned first data with respect to the above-mentionedphysical block which is contained in the above-mentioned secondtranslation table and from which the above-mentioned first data has notbeen read out.

A nonvolatile storage device according to another aspect of the presentinvention comprises a plurality of physical blocks; a write means fordividing input data and writing the divided data in a plurality of theabove-mentioned physical blocks or divided areas of the above-mentionedphysical blocks; a link table generation means for generating a linktable which is link information of a plurality of the above-mentionedphysical blocks or the above-mentioned areas in which the divided inputdata is written respectively; and a third table generation means forgenerating a third table which indicates whether each of theabove-mentioned physical blocks has been cleared or not, wherein theabove-mentioned physical block has a data area which stores data thereinand a first data which indicates whether the above-mentioned physicalblock has been cleared or not, and at least one above-mentioned physicalblock or one above-mentioned area among a plurality of theabove-mentioned physical blocks or the above-mentioned areas in whichdivided input data is written respectively further has theabove-mentioned link table, and the above-mentioned third tablegeneration means reads out the above-mentioned first data and theabove-mentioned link table from the above-mentioned physical block orthe above-mentioned area, decides a value of the above-mentioned thirdtable of the above-mentioned physical block in accordance with theabove-mentioned first data, determines that a value of theabove-mentioned third table of the above-mentioned physical blockcorresponding to the physical address contained in the above-mentionedlink table is the value indicating that the above-mentioned physicalblock has not been cleared, and does not read the above-mentioned firstdata with respect to the above-mentioned physical block which iscontained in the above-mentioned link table and from which theabove-mentioned first data has not been read out.

A nonvolatile storage device according to another aspect of the presentinvention comprises a plurality of physical blocks; a first tablegeneration means for generating a first translation table to obtainphysical addresses from logical addresses; a second table generationmeans for generating a second translation table to obtain physicaladdresses from logical addresses; and a fourth table generation meansfor generating a fourth table which indicates whether valid data iswritten in each of the above-mentioned physical blocks or divided areasof the above-mentioned physical blocks or not, wherein theabove-mentioned physical block or the above-mentioned area has a dataarea which stores data therein, and the above-mentioned physical blockor the above-mentioned area designated by the physical address of theabove-mentioned first translation table further has the above-mentionedsecond translation table and a second flag which indicates whether theabove-mentioned second translation table is valid or not, and theabove-mentioned fourth table generation means reads out theabove-mentioned second flag and the above-mentioned second translationtable from the above-mentioned physical block or the above-mentionedarea, decides a value of the above-mentioned fourth table of theabove-mentioned physical block or the above-mentioned area in accordancewith the above-mentioned second flag, determines that a value of theabove-mentioned fourth table of the above-mentioned physical block orthe above-mentioned area corresponding to the physical address containedin the above-mentioned second translation table is the value indicatingthat valid data is written, and does not read the above-mentioned secondflag with respect to the above-mentioned physical block or theabove-mentioned area which is contained in the above-mentioned secondtranslation table and from which the above-mentioned second flag has notbeen read out.

The above-mentioned nonvolatile storage device according to anotheraspect of the present invention, wherein the above-mentioned nonvolatilestorage device comprises a plurality of bus lines and a plurality ofnonvolatile storage elements which have a plurality of theabove-mentioned physical blocks and are connected to the above-mentionedbus lines, and the number of the above-mentioned second translationtable which is written in the above-mentioned nonvolatile storageelements connected to the above-mentioned bus lines is substantiallysame for each bus line.

The above-mentioned nonvolatile storage device according to anotheraspect of the present invention, wherein the above-mentioned nonvolatilestorage device comprises a plurality of bus lines and a plurality ofnonvolatile storage elements which have a plurality of theabove-mentioned physical blocks and are connected to the above-mentionedbus lines, and the number of the above-mentioned link table which iswritten in the above-mentioned nonvolatile storage elements connected tothe above-mentioned bus lines is substantially same for each bus line.

A control method of a nonvolatile storage device according to anotheraspect of the present invention is a control method of a nonvolatilestorage device comprising: a plurality of physical blocks; a first tablegeneration means for generating a first translation table to obtainphysical addresses from logical addresses; a second table generationmeans for generating a second translation table to obtain physicaladdresses from logical addresses; and a third table generation means forgenerating a third table which indicates whether each of theabove-mentioned physical blocks has been cleared or not, wherein theabove-mentioned physical block has a data area which stores data thereinand first data which indicates whether the above-mentioned physicalblock has been cleared or not, and the above-mentioned physical blockdesignated by the physical address of the above-mentioned firsttranslation table further has the above-mentioned second translationtable, and the method having: a first decision step at which theabove-mentioned third table generation means reads out theabove-mentioned first data from the above-mentioned physical block anddecides a value of the above-mentioned third table of theabove-mentioned physical block in accordance with the above-mentionedfirst data; and a second decision step at which the above-mentionedthird table generation means reads out the above-mentioned secondtranslation table from the above-mentioned physical block and determinesthat a value of the above-mentioned third table of the above-mentionedphysical block corresponding to the physical address contained in theabove-mentioned second translation table is the value indicating thatthe above-mentioned physical block has not been cleared, wherein theabove-mentioned third table generation means does not perform theabove-mentioned first decision step with respect to the above-mentionedphysical block which is contained in the above-mentioned secondtranslation table and from which the above-mentioned first data has notbeen read out.

A control method of a nonvolatile storage device according to anotheraspect of the present invention is a control method of a nonvolatilestorage device comprising: a plurality of physical blocks; a write meansfor dividing input data and writing the divided data in a plurality ofthe above-mentioned physical blocks or divided areas of theabove-mentioned physical blocks; a link table generation means forgenerating a link table which is link information of a plurality of theabove-mentioned physical blocks and the above-mentioned areas in whichthe divided input data is written respectively; and a third tablegeneration means for generating a third table which indicates whethereach of the above-mentioned physical blocks has been cleared or not,wherein the above-mentioned physical block has a data area which storesdata therein and first data which indicates whether the above-mentionedphysical block has been cleared or not, and at least one above-mentionedphysical block or one above-mentioned area among a plurality of theabove-mentioned physical blocks or the above-mentioned areas in whichdivided input data is written respectively further has theabove-mentioned link table, and the method having: a first decision stepat which the above-mentioned third table generation means reads out theabove-mentioned first data from the above-mentioned physical block orthe above-mentioned area and decides a value of the above-mentionedthird table of the above-mentioned physical block in accordance with theabove-mentioned first data; and a second decision step at which theabove-mentioned third table generation means reads out theabove-mentioned link table from the above-mentioned physical block orthe above-mentioned area and determines that a value of theabove-mentioned third table of the above-mentioned physical blockcorresponding to the physical address contained in the above-mentionedlink table is the value indicating that the above-mentioned physicalblock has not been cleared, wherein the above-mentioned third tablegeneration means does not perform the above-mentioned first decisionstep with respect to the above-mentioned physical block or theabove-mentioned area which is contained in the above-mentioned linktable and from which the above-mentioned first data has not been readout.

A control method of a nonvolatile storage device according to anotheraspect of the present invention is a control method of a nonvolatilestorage device comprising: a plurality of physical blocks; a first tablegeneration means for generating a first translation table to obtainphysical addresses from logical addresses; a second table generationmeans for generating a second translation table to obtain physicaladdresses from logical addresses; and a fourth table generation meansfor generating a fourth table which indicates whether valid data iswritten in each of the above-mentioned physical blocks or divided areasof the above-mentioned physical blocks or not, wherein theabove-mentioned physical block or the above-mentioned area has a dataarea which stores data therein, and the above-mentioned physical blockor the above-mentioned area designated by the physical address of theabove-mentioned first translation table further has the above-mentionedsecond translation table and a second flag which indicates whether theabove-mentioned second translation table is valid or not, and the methodhaving: a first decision step at which the above-mentioned fourth tablegeneration means reads out the above-mentioned second flag from theabove-mentioned physical block or the above-mentioned area, decides avalue of the above-mentioned fourth table of the above-mentionedphysical block or the above-mentioned area in accordance with theabove-mentioned second flag; and a second decision step at which theabove-mentioned fourth table generation means reads out theabove-mentioned second translation table from the above-mentionedphysical block or the above-mentioned area and determines that a valueof the above-mentioned fourth table of the above-mentioned physicalblock or the above-mentioned area corresponding to the physical addresscontained in the above-mentioned second translation table is the valueindicating that valid data is written, wherein the above-mentionedfourth table generation means does not perform the above-mentioned firstdecision step with respect to the above-mentioned physical block or theabove-mentioned area which is contained in the above-mentioned secondtranslation table and from which the above-mentioned second flag has notbeen read out.

According to the present invention, a high-speed and efficient controlat initialization can be achieved.

The novel features of the invention are set forth with particularity inthe appended claims. The invention as to both structure and content, andother objects and features thereof will best be understood from thedetailed description when considered in connection with the accompanyingdrawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1A is a flowchart part 1 of operations of a third table generationmeans and a fourth table generation means at initialization of anonvolatile storage device of Embodiment 1 according to the presentinvention.

FIG. 1B is a flowchart part 2 of operations of the third tablegeneration means and the fourth table generation means at initializationof the nonvolatile storage device of Embodiment 1 according to thepresent invention.

FIG. 2A is a flowchart part 1 of operations of the third tablegeneration means and the fourth table generation means at initializationof a nonvolatile storage device of Embodiment 2 according to the presentinvention.

FIG. 2B is a flowchart part 2 of operations of the third tablegeneration means and the fourth table generation means at initializationof the nonvolatile storage device of Embodiment 2 according to thepresent invention.

FIG. 3 is a configuration view of a nonvolatile storage device ofEmbodiment 4 according to the present invention.

FIG. 4 is a configuration view of the nonvolatile storage device.

FIG. 5 is a configuration view showing the nonvolatile storage medium inthe nonvolatile storage device.

FIG. 6 is a configuration view showing a first physical block set of thenonvolatile storage medium in the nonvolatile storage device.

FIG. 7 is a detail view showing a redundant area of a physical block ofthe nonvolatile storage medium in the nonvolatile storage device.

FIG. 8A is a flowchart part 1 of operations of the third tablegeneration means and the fourth table generation means at initializationof the conventional nonvolatile storage device.

FIG. 8B is a flowchart part 2 of operations of the third tablegeneration means and the fourth table generation means at initializationof the conventional nonvolatile storage device.

FIG. 9 is a configuration view of an entry table.

FIG. 10 is a configuration view of a data validity table.

FIG. 11 is a flowchart of operations of the third table generation meansat initialization of a nonvolatile storage device of Embodiment 3according to the present invention.

Part or All of the drawings are drawn schematically for diagrammaticrepresentation and it should be considered that they do not necessarilyreflect relative size and position of components shown therein.

BEST MODE FOR CARRYING OUT THE INVENTION

Hereinafter, embodiments that embody best mode for carrying out thepresent invention will be described with reference to the drawings.

<<Embodiment 1>>

A nonvolatile storage device of Embodiment 1 according to the presentinvention has a configuration as shown in FIG. 4. A control part 3 ofthe nonvolatile storage device of Embodiment 1 comprises a first tablegeneration means for generating a first translation table 4, a secondtable generation means for generating a second translation table in apartial logical block of a nonvolatile storage medium 2, a third tablegeneration means for generating an entry table (a third table) 6 and afourth table generation means for generating a data validity table (afourth table) 5 (not shown in FIG. 4).

FIGS. 1A and 1B are flowcharts of operations of the third tablegeneration means and the fourth table generation means at initializationof the nonvolatile storage device of Embodiment 1 according to thepresent invention. Part a of FIG. 1A, part b of FIG. 1A, part c of FIG.1A and part d of FIG. 1A are connected to part a of FIG. 1B, part b ofFIG. 1B, part c of FIG. 1B and part d of FIG. 1B, respectively.

In FIGS. 1A and 1B, at step 101, the third table generation meansinitializes all fields of the entry table by the default value 1(cleared). At step 102, the fourth table generation means initializesall fields of the data validity table by the default value 0 (invalid).At step 103, the control part 3 initializes physical block number j inthe physical block group by the default value 1. At step 104, thecontrol part 3 initializes partial logical block number i in thephysical block by the default value 1.

At step 105, the control part 3 reads out the first partial logicalblock of the j^(th) physical block in the first physical block group. Atstep 106, in accordance with the first data of a leading page of thephysical block read out, the control part 3 determines whether thephysical block is a cleared one or not. In the case of the clearedphysical block, the entry table has been already initialized with thedefault value 1 (cleared) at the step 101 and the data validity tablehas been already initialized with the default value 0 (invalid) at thestep 102. Therefore, the control part 3 completes processing of thej^(th) physical block without doing anything. In the case of the writtenphysical block, the operation proceeds to step 107 and the third tablegeneration means writes 0 (written) in the field of the physical blockof the entry table.

At step 108, the control part 3 determines whether 1 (valid) has beenalready written in the data validity table or not. In the case where 1(valid) has been written, the control part 3 completes processing thei^(th) partial logical block. In the case where the default value 0(invalid) still remains, the operation proceeds to step 111 and thecontrol part 3 determines whether the validity flag in redundant area isvalid or not. In the case where the validity flag is invalid, the datavalidity table has been already initialized with the default value 0(invalid) at the step 102, and therefore the control part 3 completesprocessing of the i^(th) partial logical block without doing anything.In the case where the validity flag is valid, the operation proceeds tostep 112 and the fourth table generation means writes 1 (valid) in thefield of the partial logical block of the data validity table.

At step 113, the control part 3 determines whether the partial logicalblock has the second translation table or not. In the case where it hasno second translation table, the control part 3 completes processing ofthe i^(th) partial logical block. In the case where it has the secondtranslation table, the operation proceeds to step 114 and the controlpart 3 reads the second translation table. At step 115, the fourth tablegeneration means writes 1 (valid) in the field of the partial logicalblock stated in the second translation table of the data validity table.

At step 116, the control part 3 adds 1 to the partial physical blocknumber i in the physical block. At step 117, the control part 3determines whether the partial physical block is a last one in thephysical block or not, that is, i>8 or not. In the case where thepartial logical block is not a last one, that is, i≦8, the operationreturns to the step 109 and the control part 3 determines whether 1(valid) has been already written in the data validity table or not. Inthe case where 1 (valid) has been written, the control part 3 completesprocessing the i^(th) partial logical block. In the case where thedefault value 0 (invalid) still remains, the operation proceeds to step110, and the control part 3 reads out the i^(th) partial logical blockof the j^(th) physical block in the first physical block group andcarries out processing at the steps 111 to 117 again. In the case wherethe partial logical block is a last one, that is, i>8 at the step 117,the control part 3 completes processing of the j^(th) physical block andproceeds to processing of the next physical block.

At step 118, the control part 3 adds 1 to the physical block number j inthe physical block group. At step 119, the control part 3 determineswhether the physical block is a last one in the physical block group ornot, that is, j>2048 or not. In the case where the physical block is nota last one, that is, j≦2048, the operation returns to the step 104 andthe control part 3 performs processing of the next physical block. Inthe case where the physical block is a last one, that is, j>2048, thecontrol part 3 completes processing of the first physical block groupand proceeds to processing of the second physical block group.

At step 120, the control part 3 initializes physical block group numberk by the default value 2. At step 121, the control part 3 initializesphysical block number j in the physical block group by the default value1.

At step 122, the control part 3 reads out the first partial logicalblock of the j^(th) physical block in the k^(th) physical block group.At step 123, in accordance with the first data of a leading page of thephysical block read out, the control part 3 determines whether thephysical block is a cleared one or not. In the case of the clearedphysical block, the entry table has been already initialized with thedefault value 1 (cleared) at the step 101 and therefore the control part3 completes processing of the j^(th) physical block without doinganything. In the case of the written physical block, the operationproceeds to step 124 and the third table generation means writes 0(written) in the field of the physical block of the entry table.

At step 125, the control part 3 adds 1 to the physical block number j inthe physical block group. At step 126, the control part 3 determineswhether the physical block is a last one in the physical block group ornot, that is, j>2048 or not. In the case where the physical block is nota last one, that is, j≦2048, the operation returns to the step 122 andthe control part 3 performs processing of the next physical block. Inthe case where the physical block is a last one, that is, j>2048, thecontrol part 3 completes processing of the k^(th) physical block groupand proceeds to processing of the next physical block group.

At step 127, the control part 3 adds 1 to the physical block groupnumber k. At step 128, the control part 3 determines whether thephysical block group is a last one or not, that is, k>8 or not. In thecase where the physical block group is not a last one, that is, k≦8, theoperation returns to the step 121 and the control part 3 carries outprocessing of the next physical block group. In the case where thephysical block group is a last one, that is, k>8, this flowchart ends.

In Embodiment 1, at the step 115, the fourth table generation meansgenerates the data validity table by using the second translation table.At the steps 108 and 109, with respect to the partial logical block thatthe data validity table is generated at the step 115, the control part 3decides not to read out data therefrom. Therefore, the number of partiallogical block read out at the step 110 decreases. This enables thefourth table generation means to reduce time for generating the datavalidity table. That is, the nonvolatile storage device 1 can achieveshortening of initialization time.

When the second translation table is read at the step 114 and steps ofreading out the second translation table from the second to eighthpartial logical blocks (omitted in FIG. 1B), the first table generationmeans associates physical address with logical address of the partiallogical block having the second translation table, and writes them inthe first translation table.

When the nonvolatile storage device makes the nonvolatile storage mediumstore new data therein, the control part detects a cleared physicalblock from the entry table and writes the new data in it. The secondtable generation means generates the second translation table in theredundant area of the partial logical block in which the new data iswritten, associates physical address with logical address of the newdata, and writes them in the second translation table.

In the case where the nonvolatile storage medium physically erasesinvalid data, the control part detects the physical block that all ofeight partial logical blocks are invalid by the data validity table andphysically erases the physical block.

<<Embodiment 2>>

A nonvolatile storage device of Embodiment 2 according to the presentinvention has the same configuration as the nonvolatile storage deviceof Embodiment 1 (FIG. 4). The nonvolatile storage device of Embodiment 2is similar to the nonvolatile storage device of Embodiment 1 except forthe following points.

FIGS. 2A and 2B are flowcharts of operations of the third tablegeneration means and the fourth table generation means at initializationof the nonvolatile storage device of Embodiment 2 according to thepresent invention. Part a of FIG. 2A, part b of FIG. 2A, part c of FIG.2A and part d of FIG. 2A are connected to part a of FIG. 2B, part b ofFIG. 2B, part c of FIG. 2B and part d of FIG. 2B, respectively.

In FIGS. 2A and 2B, at step 201, the third table generation meansinitializes all fields of the entry table by the default value 1(cleared). At step 202, the fourth table generation means initializesall fields of the data validity table by the default value 0 (invalid).At step 203, the control part 3 initializes physical block number j inthe physical block group by the default value 1. At step 204, thecontrol part 3 initializes partial logical block number i in thephysical block by the default value 1.

At step 205, the control part 3 reads out the first partial logicalblock of the j^(th) physical block in the first physical block group. Atstep 206, in accordance with the first data of a leading page of thephysical block read out, the control part 3 determines whether thephysical block is a cleared one or not. In the case of the clearedphysical block, the entry table has been already initialized with thedefault value 1 (cleared) at the step 201 and the data validity tablehas been already initialized with the default value 0 (invalid) at thestep 202. Therefore, the control part 3 completes processing of thej^(th) physical block without doing anything. In the case of the writtenphysical block, the operation proceeds to step 207 and the third tablegeneration means writes 0 (written) in the field of the physical blockof the entry table.

At step 208, the control part 3 determines whether the physical blockhas a link table or not. In the case where it has no link table, theoperation proceeds to step 212. In the case where it has a link table,the operation proceeds to step 209 and the control part 3 reads the linktable. At step 210, the third table generation means writes 0 (written)in the field of the physical block including the partial logical blockstated in the link table, in the entry table.

At step 212, the control part 3 determines whether the validity flag inredundant area is valid or not. In the case where the validity flag isinvalid, the data validity table has been already initialized with thedefault value 0 (invalid) at the step 202, and therefore the controlpart 3 completes processing of the i^(th) partial logical block withoutdoing anything. In the case where the validity flag is valid, theoperation proceeds to step 213 and the fourth table generation meanswrites 1 (valid) in the field of the partial logical block of the datavalidity table.

At step 214, the control part 3 adds 1 to the partial physical blocknumber i in the physical block. At step 215, the control part 3determines whether the partial physical block is a last one in thephysical block or not, that is, i>8 or not. In the case where thepartial logical block is not a last one, that is, i≦8, the operationreturns to the step 211 and the control part 3 reads out the i^(th)partial logical block of the j^(th) physical block in the first physicalblock group and carries out processing at the steps 212 to 215 again. Inthe case where the partial logical block is a last one, that is, i>8 atthe step 215, the control part 3 completes processing of the j^(th)physical block and proceeds to processing of the next physical block.

At step 216, the control part 3 adds 1 to the physical block number j inthe physical block group. At step 217, the control part 3 determineswhether the physical block is a last one in the physical block group ornot, that is, j>2048 or not. In the case where the physical block is nota last one, that is, j≦2048, the operation returns to the step 204 andthe control part 3 performs processing of the next physical block. Inthe case where the physical block is a last one, that is, j>2048, thecontrol part 3 completes processing of the first physical block groupand proceeds to processing of the second physical block group.

At step 218, the control part 3 initializes physical block group numberk by the default value 2. At step 219, the control part 3 initializesphysical block number j in the physical block group by the default value1.

At step 220, the control part 3 determines whether 0 (written) has beenalready written in the entry table or not. In the case where 0 (written)has been written, the control part 3 completes processing of the j^(th)physical block. In the case where the default value 1 (cleared) stillremains, the control part 3 reads out the first partial logical block ofthe j^(th) physical block in the k^(th) physical block group at step221. At step 222, in accordance with the first data of a leading page ofthe physical block read out, the control part 3 determines whether thephysical block is a cleared one or not. In the case of the clearedphysical block, the entry table has been already initialized with thedefault value 1 (cleared) at the step 201 and therefore the control part3 completes the processing of the j^(th) physical block without doinganything. In the case of the written physical block, the operationproceeds to step 223 and the third table generation means writes 0(written) in the field of the physical block of the entry table.

At step 224, the control part 3 adds 1 to the physical block number j inthe physical block group. At step 225, the control part 3 determineswhether the physical block is a last one in the physical block group ornot, that is, j>2048 or not. In the case where the physical block is nota last one, that is, j≦2048, the operation returns to the step 220 andthe control part 3 performs processing of the next physical block. Inthe case where the physical block is a last one, that is, j>2048, thecontrol part 3 completes processing of the k^(th) physical block groupand proceeds to processing of the next physical block group.

At step 226, the control part 3 adds 1 to the physical block groupnumber k. At step 227, the control part 3 determines whether thephysical block group is a last one or not, that is, k>8 or not. In thecase where the physical block group is not a last one, that is, k≦8, theoperation returns to the step 219 and the control part 3 carries outprocessing of the next physical block group. In the case where thephysical block group is a last one, that is, k>8, this flowchart ends.

In addition, the link table may exist in any block group of the first toeighth physical block groups and similar effects can be achieved.

In Embodiment 2, at the step 210, the third table generation meansgenerates the entry table by using the link table. At the step 220, withrespect to the partial logical block that the entry table is generatedat the step 210, the control part 3 decides not to read out datatherefrom. Therefore, the number of partial logical block read out atthe step 221 decreases. This enables the third table generation means toreduce time for generating the entry table. That is, similarly inEmbodiment 1, the nonvolatile storage device 1 can achieve shortening ofinitialization time.

<<Embodiment 3>>

A nonvolatile storage device of Embodiment 3 according to the presentinvention has the same configuration as the nonvolatile storage deviceof Embodiment 1 (FIG. 4). The nonvolatile storage device of Embodiment 3is similar to the nonvolatile storage device of Embodiment 1 except forthe following points.

FIG. 11 is a flowchart of operations of the third table generation meansat initialization of the nonvolatile storage device of Embodiment 3according to the present invention.

In FIG. 11, at step 1101, the third table generation means initializesall fields of the entry table by the default value 1 (cleared). At step1102, the control part 3 initializes physical block group number k bythe default value 1. At step 1103, the control part 3 initializesphysical block number j in the physical block group by the default value1.

At step 1104, the control part 3 determines whether 0 (written) has beenalready written in the entry table or not. In the case where 0 (written)has been written, the control part 3 completes processing of the j^(th)physical block. In the case where the default value 1 (cleared) stillremains, the control part 3 reads out the first partial logical block ofthe j^(th) physical block in the k^(th) physical block group at step1105. At step 1106, in accordance with the first data of a leading pageof the physical block read out, the control part 3 determines whetherthe physical block is a cleared one or not. In the case of the clearedphysical block, the entry table has been already initialized with thedefault value 1 (cleared) at the step 1101 and therefore the controlpart 3 completes the processing of the j^(th) physical block withoutdoing anything. In the case of the written physical block, the operationproceeds to step 1107 and the third table generation means writes 0(written) in the field of the physical block of the entry table.

At step 1108, the control part 3 determines whether the partial logicalblock has the second translation table or not. In the case where it hasno second translation table, the control part 3 completes processing ofthe j^(th) physical block. In the case where it has the secondtranslation table, the operation proceeds to step 1109 and the controlpart 3 reads the second translation table. At step 1110, the third tablegeneration means writes 0 (written) in the field of the physical blockincluding the partial logical block stated in the second translationtable, in the entry table.

At step 1111, the control part 3 adds 1 to the physical block number jin the physical block group. At step 1112, the control part 3 determineswhether the physical block is a last one in the physical block group ornot, that is, j>2048 or not. In the case where the physical block is nota last one, that is, j≦2048, the operation returns to the step 1104 andthe control part 3 performs processing of the next physical block. Inthe case where the physical block is a last one, that is, j>2048, thecontrol part 3 completes processing of the k^(th) physical block groupand proceeds to processing of the next physical block group.

At step 1113, the control part 3 adds 1 to the physical block groupnumber k. At step 1114, the control part 3 determines whether thephysical block group is a last one or not, that is, i>8 or not. In thecase where the physical block group is not a last one, that is, i≦8, theoperation returns to the step 1103 and the control part 3 performsprocessing the next physical block group. In the case where the physicalblock group is a last one, that is, i>8, this flowchart ends.

In Embodiment 3, at the step 1110, the third table generation meansgenerates the entry table by using the second translation table. At thestep 1104, with respect to the physical block that the entry table isgenerated at the step 1110, the control part 3 decides not to read outdata therefrom. Therefore, the number of physical block read out at thestep 1105 decreases. This enables the third table generation means toreduce time for generating the entry table. That is, similarly inEmbodiment 1, the nonvolatile storage device 1 can achieve shortening ofinitialization time.

<<Embodiment 4>>

FIG. 3 is a configuration view of a nonvolatile storage device ofEmbodiment 4 according to the present invention.

In FIG. 3, the nonvolatile storage device 31 has a control part 32 and aplurality of flash memories (nonvolatile storage mediums) 33 to 36. Thecontrol part 32 is connected to two bus lines 37 and 38, each bus linebeing connected to as many (two) flash memories. It is constructed sothat the flash memories connected to one bus line have the same numberof second translation tables and link tables as those connected to otherbus line as far as possible.

When power is applied, the control part 32 reads the validity flag, thefirst data, the link table and the second translation table that arestored in each physical block within the flash memories and generatesthe first translation table 4, the entry table 6 and the data validitytable 5 (initialization processing). It is constructed so that the flashmemories connected to one bus line have approximately the same number ofsecond translation tables and link tables as those connected to otherbus line, so that the nonvolatile storage device 1 can read about equalamount of data through each bus line at initialization (transfer loadthrough each bus line can be equalized). More data transfer amountthrough a certain bus-line requires a longer time to transfer datathrough the bus line, thereby leading to an increase in total time forinitialization processing. As in Embodiment 4, by equalizing datatransfer amount through each bus line, the nonvolatile storage device 1can achieve shortening of total time for initialization processing.

By reducing the number of physical block or partial logical block neededto be read and shortening initialization time of the nonvolatile storagedevice, the nonvolatile storage device can respond to an externalrequest in a short time after power is applied. Therefore, products (forexample, cellular phone) having a nonvolatile storage device (forexample, IC cards such as SD card) can fulfill its function in a shorttime after power is applied.

Although the invention has been described in its preferred form with acertain degree of particularity, it is understood that the presentdisclosure of the preferred form may be changed in the details ofconstruction and the combination and arrangement of parts may beresorted to without departing from the spirit and the scope of theinvention as hereinafter claimed

INDUSTRIAL APPLICABILITY

The nonvolatile storage device and control method thereof according tothe present invention are useful as the nonvolatile storage device whichis capable of connecting to various apparatus such as portable deviceand control method thereof.

1. A nonvolatile storage device comprising: a plurality of physicalblocks; a first table generation means for generating a firsttranslation table to obtain physical addresses from logical addresses; asecond table generation means for generating a second translation tableto obtain physical addresses from logical addresses; and a third tablegeneration means for generating a third table which indicates whethereach of said physical blocks has been cleared or not, wherein saidphysical block has a data area which stores data therein and first datawhich indicates whether said physical block has been cleared or not, andsaid physical block designated by the physical address of said firsttranslation table further has said second translation table, and saidthird table generation means reads out said first data and said secondtranslation table from said physical block, decides a value of saidthird table of said physical block in accordance with said first data,determines that a value of said third table of said physical blockcorresponding to the physical address contained in said secondtranslation table is the value indicating that said physical block hasnot been cleared, and does not read said first data with respect to saidphysical block which is contained in said second translation table andfrom which said first data has not been read out.
 2. A nonvolatilestorage device in accordance with claim 1, wherein said nonvolatilestorage device comprises a plurality of bus lines and a plurality ofnonvolatile storage elements which have a plurality of said physicalblocks and are connected to said bus lines, and the number of saidsecond translation table which is written in said nonvolatile storageelements connected to said bus lines is substantially same for each busline.
 3. A nonvolatile storage device comprising: a plurality ofphysical blocks; a write means for dividing input data and writing thedivided data in a plurality of said physical blocks or divided areas ofsaid physical blocks; a link table generation means for generating alink table which is link information of a plurality of said physicalblocks or said areas in which the divided input data is writtenrespectively; and a third table generation means for generating a thirdtable which indicates whether each of said physical blocks has beencleared or not, wherein said physical block has a data area which storesdata therein and a first data which indicates whether said physicalblock has been cleared or not, and at least one said physical block orsaid area among a plurality of said physical blocks or said areas inwhich divided input data is written respectively further has said linktable, and said third table generation means reads out said first dataand said link table from said physical block or said area, decides avalue of said third table of said physical block in accordance with saidfirst data, determines that a value of said third table of said physicalblock corresponding to the physical address contained in said link tableis the value indicating that said physical block has not been cleared,and does not read said first data with respect to said physical blockwhich is contained in said link table and from which said first data hasnot been read out.
 4. A nonvolatile storage device in accordance withclaim 3, wherein said nonvolatile storage device comprises a pluralityof bus lines and a plurality of nonvolatile storage elements which havea plurality of said physical blocks and are connected to said bus lines,and the number of said link table which is written in said nonvolatilestorage elements connected to said bus lines is substantially same foreach bus line.
 5. A nonvolatile storage device comprising: a pluralityof physical blocks; a first table generation means for generating afirst translation table to obtain physical addresses from logicaladdresses; a second table generation means for generating a secondtranslation table to obtain physical addresses from logical addresses;and a fourth table generation means for generating a fourth table whichindicates whether valid data is written in each of said physical blocksor divided areas of said physical blocks or not, wherein said physicalblock or said area has a data area which stores data therein, and saidphysical block or said area designated by the physical address of saidfirst translation table further has said second translation table and asecond flag which indicates whether said second translation table isvalid or not, and said fourth table generation means reads out saidsecond flag and said second, translation table from said physical blockor said area, decides a value of said fourth table of said physicalblock or said area in accordance with said second flag, determines thata value of said fourth table of said physical block or said areacorresponding to the physical address contained in said secondtranslation table is the value indicating that valid data is written,and does not read said second flag with respect to said physical blockor said area which is contained in said second translation table andfrom which said second flag has not been read out.
 6. A control methodof a nonvolatile storage device comprising: a plurality of physicalblocks; a first table generation means for generating a firsttranslation table to obtain physical addresses from logical addresses; asecond table generation means for generating a second translation tableto obtain physical addresses from logical addresses; and a third tablegeneration means for generating a third table which indicates whethereach of said physical blocks has been cleared or not, wherein saidphysical block has a data area which stores data therein and first datawhich indicates whether said physical block has been cleared or not, andsaid physical block designated by the physical address of said firsttranslation table further has said second translation table, and themethod having: a first decision step at which said third tablegeneration means reads out said first data from said physical block anddecides a value of said third table of said physical block in accordancewith said first data; and a second decision step at which said thirdtable generation means reads out said second translation table from saidphysical block and determines that a value of said third table of saidphysical block corresponding to the physical address contained in saidsecond translation table is the value indicating that said physicalblock has not been cleared, wherein said third table generation meansdoes not perform said first decision step with respect to said physicalblock which is contained in said second translation table and from whichsaid first data has not been read out.
 7. A control method of anonvolatile storage device comprising: a plurality of physical blocks; awrite means for dividing input data and writing the divided data in aplurality of said physical blocks or divided areas of said physicalblocks; a link table generation means for generating a link table whichis link information of a plurality of said physical blocks and saidareas in which the divided input data is written respectively; and athird table generation means for generating a third table whichindicates whether each of said physical blocks has been cleared or not,wherein said physical block has a data area which stores data thereinand first data which indicates whether said physical block has beencleared or not, and at least one said physical block or said area amonga plurality of said physical blocks or said areas in which divided inputdata is written respectively further has said link table, and the methodhaving: a first decision step at which said third table generation meansreads out said first data from said physical block or said area anddecides a value of said third table of said physical block in accordancewith said first data; and a second decision step at which said thirdtable generation means reads out said link table from said physicalblock or said area and determines that a value of said third table ofsaid physical block corresponding to the physical address contained insaid link table is the value indicating that said physical block has notbeen cleared, wherein said third table generation means does not performsaid first decision step with respect to said physical block or saidarea which is contained in said link table and from which said firstdata has not been read out.
 8. A control method of a nonvolatile storagedevice comprising: a plurality of physical blocks; a first tablegeneration means for generating a first translation table to obtainphysical addresses from logical addresses; a second table generationmeans for generating a second translation table to obtain physicaladdresses from logical addresses; and a fourth table generation meansfor generating a fourth table which indicates whether valid data iswritten in each of said physical blocks or divided areas of saidphysical blocks or not, wherein said physical block or said area has adata area which stores data therein, and said physical block or saidarea designated by the physical address of said first translation tablefurther has said second translation table and a second flag whichindicates whether said second translation table is valid or not, and themethod having: a first decision step at which said fourth tablegeneration means reads out said second flag from said physical block orsaid area, decides a value of said fourth table of said physical blockor said area in accordance with said second flag; and a second decisionstep at which said fourth table generation means reads out said secondtranslation table from said physical block or said area and determinesthat a value of said fourth table of said physical block or said areacorresponding to the physical address contained in said secondtranslation table is the value indicating that valid data is written,wherein said fourth table generation means does not perform said firstdecision step with respect to said physical block or said area which iscontained in said second translation table and from which said secondflag has not been read out.